/*
 * @Author: your name
 * @Date: 2021-03-28 09:51:05
 * @LastEditTime: 2021-03-30 13:26:17
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \my-app-koa\models\User.js
 */
const mongoose = require('mongoose');
const Schema = mongoose.Schema;

// 实例化数据模板
const UserSchema = new Schema({
    name: {
        type: String,
        required: true
    },
    email: {
        type: String,
        required: true
    },
    password: {
        type: String,
        required: true
    },
    avatar: {
        type: String
    },
    date: {
        type: Date,
        default: Date.now

    }
})


module.exports = User = mongoose.model("users", UserSchema)